home *** CD-ROM | disk | FTP | other *** search
/ CinE CD 6 / CinE CD ROM 06.iso / pc / cinecd.dir / 00002_Script_2 < prev    next >
Text File  |  1996-06-22  |  2KB  |  84 lines

  1. global gNumFilms, gmachine, grootpathname, gseparator, gQTpresent, database
  2. global gfilmsperpage, gpage, gnumpages, gdata, gscale, gmode
  3.  
  4. on startmovie
  5.   Init
  6.   cursor (4)
  7.   --play movie "MAIN"
  8. end startmovie
  9.  
  10. on Init
  11.   global gsoundEnabled, DEBUG
  12.   
  13.   set gsoundEnabled = TRUE
  14.   
  15.   set DEBUG = 0
  16.   set gscale = 1
  17.   --set gmode = "auto"
  18.   set the timeoutLength to 5 * 60
  19.   set the timeoutPlay = TRUE
  20.   
  21.   --determine machine type
  22.   set gmachine = determine_machine_type ()
  23.   
  24.   --define separator for mac/pc
  25.   set gseparator = separator (gmachine)
  26.   
  27.   -- get the pathname of the projector
  28.   put the pathname into grootpathname
  29.   
  30.   -- read the index file
  31.   if gmachine = "mac" then
  32.     read_index_file (the pathname & "INDEXMAC.DOC")
  33.   else
  34.     read_index_file (the pathname & "INDEXPC.DOC")
  35.   end if
  36.   
  37.   -- there are 8 posters per index page
  38.   set gfilmsperpage = 8
  39.   
  40.   -- make the database based on index file
  41.   makedatabase the number of cast "database"
  42.   
  43.   -- initialize index page number
  44.   set gpage = 1
  45.   
  46.   --determine and set the number of index pages
  47.   --set gnumpages = gnumfilms / gfilmsperpage
  48.   --if (gnumfilms mod gfilmsperpage) then
  49.   --set gnumpages = gnumpages + 1
  50.   --end if
  51.   
  52.   --check if Quicktime is present and set the global variable
  53.   set gQTpresent = the quicktimepresent
  54.   
  55.   if not gQTpresent then
  56.     alert "Vous devez installer le gestionnaire Quicktime d'Apple Computer Inc. pour pouvoir visualiser les bandes annonces!"
  57.   end if
  58. end Init
  59.  
  60. on determine_machine_type
  61.   if the machineType < 256 then
  62.     return "mac"
  63.   else
  64.     return "pc"
  65.   end if
  66. end determine_machine_type
  67.  
  68. on separator machine_type
  69.   if machine_type = "pc" then
  70.     return "\"
  71.   else
  72.     return ":"
  73.   end if
  74. end separator
  75.  
  76. on read_index_file fname
  77.   put FileIO (mnew, "read", fname) into gdata
  78.   if (gdata < 0) then
  79.     alert ("Fichier INDEX non-trouvΘ, au revoir!")
  80.     quit
  81.   end if
  82.   set the text of cast the number of cast "database" = gdata (mreadfile)
  83.   gdata (mdispose)
  84. end read_index_file